package com.jyx.cloud.controller;

import com.jyx.cloud.entity.CommonResult;
import com.jyx.cloud.entity.Member;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @version 1.0
 * @email myzczk@myzczk.com
 * @company www.myzczk.com
 * @create-time 2020/6/15 17:34
 */
@RestController
@Slf4j
public class ConsulController {

    private static final String CONSUL_URL = "http://consul-provider-payment/";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping(value = "/customer/payment/consul")
    public String getMember(){
        return restTemplate.getForObject(CONSUL_URL+"payment/consul", String.class);
    }

}
